The purpose of this replication package is to replicate the findings reported in Ines Levin and Betsy Sinclair. “Causal Inference with Complex Survey Designs: Generating Population Estimates Using Survey Weights.” R.M. Alvarez and L.R. Atkeson (Eds.), Handbook on Polling and Polling Methods. Oxford University Press. 

It contains the following files:

script_mainsim.R (Main simulation with correct survey weights, produces "sim_results.Rdata”)

results_mainsim.R (Makes Figure 1 and Table 1 using "sim_results.Rdata”)

script_misspec1.R (Simulation with misspecified survey weights, misspecification #1, produces "sim_results_miss1.Rdata”)

results_misspec1.R (Makes Figure 2, Panel A, using "sim_results_miss1.Rdata”)

script_misspec2.R (Simulation with misspecified survey weights, misspecification #2, produces "sim_results_miss2.Rdata”)

results_misspec2.R (Makes Figure 2, Panel B, using "sim_results_miss2.Rdata”)

script_application.R (Measures effect of social media usage on political participation, makes Table 2)

data_taps.Rdata (recoded TAPS data required by “script_application.R”)